﻿<%@ Page Title="" Language="C#" MasterPageFile="~/trangchu.master" AutoEventWireup="true" CodeFile="SanPham.aspx.cs" Inherits="SanPham" %>
<%@ Register assembly="CollectionPager" namespace="SiteUtils" tagprefix="cc1" %>
<%@ Register src="usercontrol/SanPham.ascx" tagname="SanPham" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style7
        {
            width: 32px;
            height: 32px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 100%;">
        <tr>
            <td style="font-weight: 700; color: #FFFFFF; text-align: center; background-color: #FF0000">
                Sản Phẩm</td>
        </tr>
        <tr>
            <td>
                <%--<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:COMPUTERConnectionString %>" 
                    
                    
                    SelectCommand="SELECT top 10 MaSP, TenSP, Hinh, Gia, MieuTa FROM SanPham order by MaSP asc"></asp:SqlDataSource>--%>
                <asp:DataList ID="DataList1" runat="server" DataKeyField="MaSP" 
                    RepeatColumns="2" RepeatDirection="Horizontal" BackColor="#CCCCCC" 
                    BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" 
                    CellSpacing="2" ForeColor="Black" GridLines="Both" Width="100%">
                    <FooterStyle BackColor="#CCCCCC" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <ItemStyle BackColor="White" />
                    <ItemTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td rowspan="4">
                                    <asp:Image ID="Image1" runat="server" Height="100px" 
                                        ImageUrl='<%# "~/Upload/"+Eval("Hinh") %>' Width="100px" />
                                </td>
                                <td>
                                    <asp:Label ID="TenSPLabel" runat="server" Text='<%# Eval("TenSP") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="MieuTaLabel" runat="server" Text='<%# Eval("MieuTa") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Giá:
                                    <asp:Label ID="GiaLabel" runat="server" Text='<%# Eval("Gia") %>' 
                                        style="color: #FF0000" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <img alt="" class="style7" src="Images/Giohang.gif" />
                                    <asp:HyperLink ID="HyperLink1" runat="server" 
                                        NavigateUrl='<%# "~/giohang.aspx?MaSP=" + Eval("MaSP") %>'>Mua Hàng</asp:HyperLink>
                                </td>
                            </tr>
                        </table>
                        <br />
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                </asp:DataList>
                 <center> <cc1:CollectionPager ID="CollectionPager2" runat="server" BackText="« Trước" 
                    FirstText="Đầu" LabelText="Trang:" LastText="Cuối" NextText="Sau »" 
                    ResultsFormat="Kết quả từ {0}-{1} (của {2}) bài viết" ShowFirstLast="True" 
                    SliderSize="10" PagingMode="PostBack" BackNextDisplay="Buttons" 
                    BackNextLinkSeparator="·" HideOnSinglePage="True" IgnoreQueryString="False" 
                    PageNumbersDisplay="Numbers" PageSize="10" ResultsLocation="Top" 
                    SectionPadding="10" ShowLabel="True" ShowPageNumbers="True" UseSlider="True" 
                        BackNextLocation="Split" LabelStyle="" ControlStyle="color:white" 
                        PageNumbersStyle="color:orange" PageNumberStyle=""></cc1:CollectionPager></center>
            </td>
        </tr>
    </table>
</asp:Content>

